package com.whc.common.design.handle.type;

import com.whc.common.Context;
import com.whc.mapper.CommonMapper;

import java.util.Map;

public abstract class TypeChain {
    TypeChain handle;
    CommonMapper commonMapper;

    public TypeChain addHandle(TypeChain typeChain) {
        commonMapper = Context.getBean("commonMapper", CommonMapper.class);
        typeChain.commonMapper = commonMapper;
        this.handle = typeChain;
        return typeChain;
    }

    public abstract Object handler(Map<String, Object> body);
}
